package com.kazu.utils.exception.handler;

import java.io.Serializable;

/**
 * @Author kazu
 * @Date 2023/2/19 14:27
 * @Version 1.0
 *
 * 自定义手动异常处理
 */
@SuppressWarnings({"all"})
public class CastomException extends RuntimeException {

	private static final Long serialVersionUID = 1L;
	
	private Integer code = 500;
	
	private String msg = "";
	
	public CastomException(String msg) {
		super(msg);
		this.msg = msg;
	}
	
	public CastomException(String msg, Throwable e) {
		super(msg, e);
		this.msg = msg;
	}
	
	public CastomException(int code, String msg) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}
	
	public CastomException(int code, String msg, Throwable e) {
		super(msg, e);
		this.msg = msg;
		this.code = code;
	}
	
	public String getMsg() {
		return msg;
	}
	
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	public int getCode() {
		return code;
	}
	
	public void setCode(int code) {
		this.code = code;
	}

}
